var environment=_gl.environment||"production";
var ajaxUrl={
    "local":{
        "settimeoutTime":1400,
        "dataList":_gl._host_res+"/res/js/data/fansList.json"
    },
    "production":{
        "settimeoutTime":0,
        "dataList":_gl._host_api+"/fans"
    }
};
$(function(){
    _fridayTable.setTableTr({
        "url":ajaxUrl[environment].dataList,
        "columns":[
            {
                "fieldName":null,
                "dom":"seq"
            },
            {
                "fieldName":"headimgurl",
                "renderFun": function (val) {
                    return '<div class="headImg"><img src="'+val+'"></div>';
                }
            },
            {
                "fieldName":"nickname"
            },
            {
                "fieldName":"wx_no"
            },
            {
                "fieldName":"sex",
                "formatFun": _helper.sexFormat
            },
            {
                "fieldName":"country"
            },
            {
                "fieldName":"province"
            },
            {
                "fieldName":"city"
            },
            {
                "fieldName":"subscribe",
                "formatFun": subscribeFormat
            },
            {
                "fieldName":"subscribe_time",
                "formatFun": _helper.timeFormat
            }
        ]
    });
    _fridayTable.searchData();


    //关注状态
    function subscribeFormat(str){
        if(!str) str ="";
        return str=="1"?"已关注":"已取消";
    }

});